package com.hgvip.service;

import com.hgvip.entity.User;
import com.hgvip.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by arnold.zhu on 6/8/2017.
 */
@Service
@Transactional
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public User getUserInfo(User user) {
        return user;
    }

    public List<User> getUsers() {
        return userMapper.getUsers();
    }

    public User addUser(User user) {
        userMapper.addUser(user);
        return user;
    }
}
